import Vue from 'vue'
//路由
import Router from 'vue-router'
//elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//自定义组件
import Home from '@/components/Home'
import Login from '@/components/Login'
import User from '@/components/System/User'
import Role from '@/components/System/Role'
import SysLog from '@/components/Monitor/SysLog'
import Introduce from '@/components/Introduce'
import Menu from "@/components/System/Menu"
import Button from "@/components/System/MenuDetail/Button"
import Folder from "@/components/System/MenuDetail/Folder"
import MenuDetail from "@/components/System/MenuDetail/MenuDetail"

Vue.use(ElementUI);
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'Login',
    component: Login
  }, {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [{
      path: '/introduce',
      name: 'Introduce',
      component: Introduce
    }, {
      path: '/sys/user',
      name: 'User',
      component: User
    }, {
      path: '/sys/role',
      name: 'Role',
      component: Role
    }, {
      path: '/sys/menu',
      name: 'Menu',
      component: Menu,
      children: [{
        path: '/menu/folder',
        name: 'Folder',
        component: Folder,
        props: true
      }, {
        path: '/menu/menu',
        name: 'MenuDetail',
        component: MenuDetail,
        props: true
      }, {
        path: '/menu/button',
        name: 'Button',
        component: Button,
        props: true
      }]
    }, {
      path: '/log/list',
      name: 'SysLog',
      component: SysLog
    }]
  }],
  "mode": "history"
})
